<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "../header.html" encoding="UTF-8"/>
</head>
<body>
<!--列表页面开始-->
<div id="rrapp" v-cloak>
    <div v-show="!detail&&showList">
        <Row :gutter="16">
            <i-col span="4">
                <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单号"/>
            </i-col>
            <i-col span="4">
                <i-select v-model="q.orderStatus">
                    <i-option value="0">待付款</i-option>
                    <i-option value="101">订单已取消</i-option>
                    <i-option value="102">订单已删除</i-option>
                    <i-option value="201">订单已付款</i-option>
                    <i-option value="300">订单已发货</i-option>
                    <i-option value="301">用户确认收货</i-option>
                    <i-option value="401">退款</i-option>
                    <i-option value="402">完成</i-option>
                </i-select>
            </i-col>
            <i-col span="4">
                <i-select v-model="q.orderType">
                    <i-option value="1">普通订单</i-option>
                    <i-option value="2">团购订单</i-option>
                    <i-option value="3">砍价订单</i-option>
                </i-select>
            </i-col>
            <i-button @click="query">查询</i-button>
           <!-- #if($shiro.hasPermission("order:sendGoods"))-->
            <i-button type="warning" @click="sendGoods">发货</i-button>
         <!--   #end
            #if($shiro.hasPermission("order:confirm"))-->
            <i-button type="error" @click="confirm">确认收货</i-button>
           <!-- #end-->
            <i-button type="error" @click="update">修改</i-button>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>
    <!--列表页面结束-->

    <!--详细页开始-->
    <Card v-show="detail">
        <p slot="title" style="height: auto">{{title}}
            <i-button type="primary" @click="print">打印订单</i-button>
        </p>
        <Tabs value="orderinfo">
            <Tab-Pane label="订单信息" name="name1">
                <i-form ref="formValidate" :model="order" :label-width="80">
                    <Form-item label="订单号" prop="orderNo">
                        <i-input v-model="order.orderNo" readonly/>
                    </Form-item>
                    <Form-item label="订单状态" prop="orderStatus" readonly>
                        <Radio-group v-model="order.orderStatus">
                            <Radio label="0" disabled>
                                <span>待处理</span>
                            </Radio>
                            <Radio label="1" disabled>
                                <span>待付款</span>
                            </Radio>
                            <Radio label="2" disabled>
                                <span>待发货</span>
                            </Radio>
                            <Radio label="3" disabled>
                                <span>已发货</span>
                            </Radio>
                            <Radio label="4" disabled>
                                <span>完成</span>
                            </Radio>
                            <Radio label="5" disabled>
                                <span>退款中</span>
                            </Radio>
                            <Radio label="6" disabled>
                                <span>已退款</span>
                            </Radio>
                            <Radio label="7" disabled>
                                <span>待收货</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="付款状态" prop="payStatus">
                        <Radio-group v-model="order.payStatus">
                            <Radio label="0" disabled>
                                <span>待付款</span>
                            </Radio>
                            <Radio label="1" disabled>
                                <span>已付款</span>
                            </Radio>
                            <Radio label="2" disabled>
                                <span>支付失败</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="收货人" prop="receiver">
                        <i-input v-model="order.receiver" />
                    </Form-item>
                    <Form-item label="收货地址" prop="address">
                        <i-input v-model="order.address" readonly/>
                    </Form-item>
                    <Form-item label="联系电话" prop="mobile">
                        <i-input v-model="order.mobile" readonly/>
                    </Form-item>
                    <Form-item label="快递公司" prop="logisticsCompany">
                        <i-input v-model="order.logisticsCompany" readonly/>
                    </Form-item>
                    <Form-item label="快递单号" prop="logisticsNo">
                        <i-input v-model="order.logisticsNo" readonly/>
                    </Form-item>
                    <!--<Form-item label="付款方" prop="payName">
                        <i-input v-model="order.payName" readonly/>
                    </Form-item>-->
                    <Form-item label="支付渠道  " prop="payChannel">
                        <Radio-group v-model="order.payChannel">
                            <Radio label="1" disabled>
                                <span>银联支付</span>
                            </Radio>
                            <Radio label="2" disabled>
                                <span>微信支付</span>
                            </Radio>
                            <Radio label="3" disabled>
                                <span>支付宝支付</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="快递费用" prop="shippingFee">
                        <i-input v-model="order.shippingFee" readonly/>
                    </Form-item>
                    <Form-item label="实际支付" prop="actualPrice">
                        <i-input v-model="order.actualPrice" readonly/>
                    </Form-item>
                    <Form-item label="订单总价" prop="orderPrice">
                        <i-input v-model="order.orderPrice" readonly/>
                    </Form-item>
                   <!-- <Form-item label="商品总价" prop="goodsPrice">
                        <i-input v-model="order.goodsPrice" readonly/>
                    </Form-item>-->
                    <Form-item label="下单时间" prop="createTime">
                        <Date-picker v-model="order.createTime" placeholder="下单时间" readonly/>
                    </Form-item>
                    <Form-item label="付款时间" prop="payTime">
                        <Date-picker v-model="order.payTime" placeholder="付款时间" readonly/>
                    </Form-item>
                    <Form-item label="配送费用" prop="freightPrice">
                        <i-input v-model="order.freightPrice" readonly/>
                    </Form-item>

                    <!--<Form-item>
                        <i-button type="primary" @click="saveOrUpdate">提交</i-button>
                        <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                        返回</i-button>
                    </Form-item>-->
                </i-form>
            </Tab-Pane>
            <Tab-Pane label="订单详细" name="orderdetail">
              <!--  <i-form ref="formValidate" :model="order" :label-width="80">-->
                   <!-- <Form-item label="商品" prop="orderDetailList"><br>
                        <ol v-model="order.orderDetailList">
                            <li v-for="orderDetail in detailList">
                                商品名称：{{ orderDetail.book.name }}&nbsp; &nbsp; &nbsp;&nbsp;
                                售价：{{orderDetail.salePrice}}&nbsp; &nbsp; &nbsp;&nbsp;
                                数量：{{orderDetail.quantity}}
                            </li>
                        </ol>
                    </Form-item>-->
                    <p>订单详情:</p>
                    <i-table v-bind:data="tableData"
                              v-bind:columns="tableColumns" :model="order" :label-width="80"></i-table>
            </Tab-Pane>
        </Tabs>

        <div style="padding-left: 20px">
            <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
            <i-button type="warning" @click="reload" style="margin-left: 8px"/>
            返回</i-button>
            <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
        </div>
    </Card>
    <!--详细结束-->

</div>
<script src="${rc.contextPath}/static/vue/js/shop/order.js"></script>
</body>
</html>